package hng.mapper;

import hng.model.UserDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import hng.vo.admin.UserDetailVO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author 告白
 * @since 2024-06-27
 */
public interface UserMapper extends BaseMapper<UserDO> {
    /**
     * 管理员分页查询用户
     */
    @Select("select * " +
            "from user ")
    List<UserDetailVO> userByAdmin();

    /**
     * 管理员分页查询管理员列表
     */
    @Select("select * " +
            "from user where role = 3 ")
    List<UserDetailVO> adminByAdmin();
}
